//
//  GDCollectionViewFlowLayout.m
//  Gunterapple
//
//  Created by 热带雨林 on 2020/4/4.
//  Copyright © 2020 热带雨林. All rights reserved.
//

#import "GDCollectionViewFlowLayout.h"

@implementation GDCollectionViewFlowLayout
- (void)prepareLayout{
    [super prepareLayout];
    self.scrollDirection = UICollectionViewScrollDirectionHorizontal;
    //单个cell尺寸就是collectionView的尺寸
//    self.itemSize = self.collectionView.frame.size;
    CGFloat wight = self.collectionView.frame.size.width - 2;
    CGFloat height = self.collectionView.frame.size.height - 2;
    self.itemSize = CGSizeMake(wight, height);
    //设置分页
    self.collectionView.pagingEnabled = YES;
    self.minimumLineSpacing = 1;
    self.minimumInteritemSpacing = 1;
    self.collectionView.showsHorizontalScrollIndicator = NO;
}
@end
